09. Installation

Installation

You are welcome to write all of your code in Udacity's web-based Workspaces. If, however, you prefer to work locally on your machine, you will need to install certain software.

## g++, gdb, make

macOS

macOS includes g++ as part of Command Line Tools.

  • Launch Terminal , which can be found in the Utilities folder in Applications .
  • Type xcode-select --install into the Terminal window and press "Enter"
  • If you don't already have Xcode or Command Line Tools installed, a window will pop up. Press the Install button.
  • Verify: Type g++ into Terminal and press enter. If the output is clang: error: no input files , then the installation was successful.

Linux

These programs are typically available through the default package manager for each Linux distribution. For example, we can use APT on Ubuntu systems.

  • sudo apt update
  • sudo apt install build-essential
  • sudo apt install gdb

Windows

MinGW provides the necessary software.

## Microsoft Visual Studio (VSCode):

The instructions for this are the same for all machines:

  • Click on the downloaded file
  • Complete the installation instructions.

## VSCode C/C++ Extension

  • Open VSCode
  • Navigate to VSCode extensions by clicking into the following menus:
    • Code > Preferences > Extensions

  • In the search bar that says " Search Extensions in Marketplace " type " C/C++ "

  • Select the C/C++ extension and press the Install button to install this extension.

## clang-format

  • This is also a VSCode extension, so navigate to Extensions using the same process as the previous section.
  • In the search bar that says "Search Extensions in Marketplace", type: " clang-format "

  • Select the Clang-Format extension and press the Install button to install this extension.